package models.crawlers.helpers;

public class StringHelper {
    public static boolean isNumeric(String s) {
        return java.util.regex.Pattern.matches("\\d+", s);
    }

    public static boolean isNullOrEmpty(String val) {
        return val == null || val.isEmpty();
    }

    public static String getPercentString(int current, int total) {
        Double result = ((double) current / (double) total) * 100;
        return String.format("%1$.0f", result);
    }
}